<?php
if (! defined('SIMPLE_TEST')) {
    define('SIMPLE_TEST', '../../../../simpletest/');
}
require_once(SIMPLE_TEST . 'unit_tester.php');
require_once(SIMPLE_TEST . 'reporter.php');
require_once('../blip-php.php');

class TestOfBlipDelete extends UnitTestCase {
    function setUp() {
    }
    
    function test_upload_then_delete() {
        $blip = new BlipPHP();
        $response = $blip->upload($username = "api_test_user", $password = "bliptastic", $file = '../videos/blip_test_footage.mp4', $title='Test Title', $description = 'Test Description');
        $delete_response = $blip->delete($username = "api_test_user", $password = "bliptastic", $id = $response->payload->asset->item_id[0], $reason = "because");
        
        var_dump($delete_response);
        $this->assertNotNull($delete_response);
        $this->assertTrue($delete_response->status == "OK");
    }
}

$test = &new TestOfBlipDelete();
$test->run(new HtmlReporter());
?>